<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@taglib prefix="s" uri="/struts-tags" %>
<!doctype html>
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
	<title>休假信息列表</title>
	
	<link href="/oas/css/style.css" rel="stylesheet" type="text/css" />
	<style type="text/css" >
		table{border-collapse:separate;width:90%;text-align:center;}
		td{margin:5px;}
		.vdInputSubmit{border:2px solid blue; padding:3px;}
	</style>
	
	<script type="text/javascript" src="/oas/js/jquery-1.11.3.min.js"></script>
	<script type="text/javascript">
		$(document).ready(function employee(url){
			try{
				$("#ajax").load(url);
			}catch(err){
				alert(err+"\n'errormessage'"+err.message);
			}
		});
	</script>
</head>
<body>
	<div class="action">
		<div class="t">
			休假信息列表
		</div>
		<div class="pages">
			<form action="/oas/vacation/apply" method="post">
				<table>
					<tr>
						<th>申请人</th>
						<th>开始时间</th>
						<th>结束时间</th>
						<th>天数</th>
						<th>审批状态</th>
						<th>原因</th>
					</tr>
					<s:iterator value="#request.vas" status="vaStatus" id="va">
						<tr>
							<td><s:property value='#va.applicant.username'/></td>
							<td><s:property value='#va.startTime.toString().substring(0, 10)'/></td>
							<td><s:property value='#va.endTime.toString().substring(0, 10)'/></td>
							<td><s:property value='#va.days'/></td>
							<s:if test="%{#va.status==0}">
							    <td>未审核</td>
							</s:if>
							<s:elseif test="%{#va.status==1}">
							    <td>已审核</td>
							</s:elseif>
							<s:else>
							    <td>审核拒绝</td>
							</s:else>
							<td><s:property value='#va.reason'/></td>
						</tr>
					</s:iterator>
				</table>
				<br/><br/>
				<span><a href="/oas/vacation/apply" target="_blank"  class="vdInputSubmit">申请休假</a></span>
			</form>
		</div>
	</div>
</body>
</html>